<template>
	<view class="content">
		<yHeader :title="tList[type]" :topBg="topBg" color="white" :showLeft="false"></yHeader>
		<view class="top"></view>
		<view class="main">
			<lHome v-if="type == 'home'"></lHome>
			<yMsg v-if="type == 'msg'"></yMsg>
			<!-- <tUser></tUser> -->
		</view>
		<yFooter ref="footer"></yFooter>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 'home',
				topBg: '#fc7941',
				tList: {
					home: '首页',
					msg: '消息',
					mine: '个人中心'
				},
				style: ''
			}
		},
		onLoad() {},
		mounted() {
			uni.$on('changeType', (e) => {
				this.type = e
			})
		},
		onPageScroll(e) {

		},
		onUnload() {
			uni.$off()
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	page {
		padding-bottom: 54px;
		background: #F9FAFD;
	}

	.top {
		background: linear-gradient(to bottom, rgba(252, 121, 65, 1), rgba(255, 147, 101, 1));
		height: 80px;
		/* #ifndef H5 */
		height: 100px;
		/* #endif */
	}

	.main {
		margin-top: -50px;
	}
</style>